// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import Api from './router/api'; //全局API
import Axios from 'axios'  //axios插件
// 引入cookies
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)
Vue.config.productionTip = false
//引入时间插件i
import moment from 'moment'//导入文件
Vue.prototype.$moment = moment;//赋值使用
moment.locale('zh-cn');//需要汉化
//引入iview
import iView from 'iview'

import 'iview/dist/styles/iview.css'    // 使用 CSS
//引入axios  需安装
Vue.prototype.$axios=Axios
//Axios.defaults.baseURL = '/api'
// Axios.defaults.baseURL = 'http://192.168.31.132:8081/'    //本地
Axios.defaults.baseURL = 'http://sw.sdrhup.com:8080/edutest/'  //测试
Axios.defaults.headers.post['Content-Type'] ='application/x-www-form-urlencoded'

Vue.use(iView)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

